package com.sayai.work.tools.overtimes.controller;

import com.sayai.work.tools.overtimes.dao.RecordDao;
import com.sayai.work.tools.overtimes.data.OtRecordsEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class DemoControl {

    @Autowired
    private RecordDao d;

    @RequestMapping("/")
    public String index() {
        return "hello, there 123";
    }

    @RequestMapping("/list")
    public List<OtRecordsEntity> list() {
        return d.findAll();
    }
}
